        
<template>
    <div>
        <el-button @click="fetchData()">重抽</el-button><el-button @click="saveData()">确定</el-button>
        <el-table :data="list" style="width: 100%">
            <el-table-column prop="groupId" label="所属组" width="180"></el-table-column>
            <el-table-column prop="userName" label="参赛人" width="180"></el-table-column>
            
        </el-table>      
    </div>
</template>
<script>
import scoreApi from '@/api/score'
import axios from "axios"

export default {
    data(){
        return {
            list:[]
        }
    },
    created(){
        this.fetchData();
    },
    methods:{
        fetchData(){
            scoreApi.persondraw().then(response => {
                this.list=response.data;
            });
        },
        saveData(){
            scoreApi.savePersonal(this.list).then(response => {

            });
        } 
    }
}
</script>